﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using DualityEngine.Business;
using DualityEngine.Business.GameModel;

namespace DualityClient.Screens
{
    public class Menu : Screen
    {
        protected Menu()
        {
            ModelManager.Instance.GameModels.Clear();
            
            //Toevoegen om wereld te creeren
            ModelManager.Instance.GameModels.Add(new Skybox(new Vector3(0, 10, 0), ResourceManager.Instance.skybox));
            ModelManager.Instance.GameModels.Add(new Planet(new Vector3(1000, 0, 1000), ResourceManager.Instance.planet, true));
            ModelManager.Instance.GameModels.Add(new Planet(new Vector3(3000, 0, 100), ResourceManager.Instance.planet, false));
            CameraManager.Instance.ActiveCamera = CameraManager.Instance.Cameras["RotatingCamera"];
        }

        public override void Update(GameTime gametime)
        {
            ModelManager.Instance.Update(gametime);
            CameraManager.Instance.UpdateCamera(gametime);
        }

        public override void Draw(GameTime gametime)
        {
            ModelManager.Instance.Draw(gametime);
            ResourceManager.Instance.spriteBatch.Draw(ResourceManager.Instance.nimalogo, new Vector2(ResourceManager.Instance.graphicsdevice.PresentationParameters.BackBufferWidth - ResourceManager.Instance.nimalogo.Width, ResourceManager.Instance.graphicsdevice.PresentationParameters.BackBufferHeight - ResourceManager.Instance.nimalogo.Height), Color.White);
        }
    }
}
